﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace WindowsFormsApplication1
{
    public class CreateLogClass
    {
        public void  runBatch()
        {
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo.FileName = "C:\\scripts\\disableUAC.bat";
            proc.StartInfo.RedirectStandardError = false;
            proc.StartInfo.RedirectStandardOutput = false;
            proc.StartInfo.UseShellExecute = false;
            proc.Start();
            proc.WaitForExit();

        }
        public void EableUAc()
        {
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo.FileName = "C:\\scripts\\enableUAC.bat";
            proc.StartInfo.RedirectStandardError = false;
            proc.StartInfo.RedirectStandardOutput = false;
            proc.StartInfo.UseShellExecute = false;
            proc.Start();
            proc.WaitForExit();


            //TO TRY TO HIDE WINDOW
//            Process scriptProc = new Process();
//scriptProc.StartInfo.FileName = @"cscript"; 
//scriptProc.StartInfo.Arguments ="//B //Nologo c:\scripts\vbscript.vbs";
//scriptProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //prevent console window from popping up
//scriptProc.Start();
//scriptProc.WaitForExit();
//scriptProc.Close();

        }
    }
}
